﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.IO;

namespace AudioEffectBox
{
    public abstract class Audio16CompositionStream : Stream
    {
        protected BinaryWriter _writer;
        protected BinaryReader _secondReader;

        public Audio16CompositionStream(Stream secondaryInput,  Stream outputStream)
        {
            if (secondaryInput == null) throw new ArgumentException("Secondary input stream must not be null");
            if (outputStream == null) throw new ArgumentException("Output stream must not be null");
            if (!secondaryInput.CanRead) throw new ArgumentException("Input stream must be readable");
            if (!outputStream.CanWrite) throw new ArgumentException("Output stream must be writeable");
            
            OutPut = outputStream;
            SecondInput = secondaryInput;
            _writer = new BinaryWriter(OutPut);
            _secondReader = new BinaryReader(SecondInput);
        }
        public Stream SecondInput { get; protected set; }
        public Stream OutPut { get; protected set; }
        public bool IsEnabled { get; set; }

        public override bool CanRead
        {
            get { return false; }
        }

        public override bool CanSeek
        {
            get { return false; }
        }

        public override bool CanWrite
        {
            get { return true; }
        }

        public override void Flush()
        {
            //do nothing
        }

        public override long Length
        {
            get { throw new NotImplementedException(); }
        }

        public override long Position
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        public override int Read(byte[] buffer, int offset, int count)
        {
            throw new NotImplementedException();
        }

        public override long Seek(long offset, SeekOrigin origin)
        {
            throw new NotImplementedException();
        }

        public override void SetLength(long value)
        {
            throw new NotImplementedException();
        }

        
    }
}
